package com.bw.counter.adapter

import android.widget.TextView
import com.bw.counter.R
import com.bw.counter.entity.CounterData
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class CounterAdapter : BaseQuickAdapter<CounterData,BaseViewHolder>(R.layout.item_count) {
    override fun convert(holder: BaseViewHolder, item: CounterData) {
        val replace = item.paymentItemIds.replace(",", "")
        holder.getView<TextView>(R.id.count_address).text = "项目名称/1栋/1单元${replace}"
        holder.getView<TextView>(R.id.count_price).text = "￥ ${item.totalAmount}"
        holder.getView<TextView>(R.id.count_name).text = "用户姓名：${item.payerName}"
        holder.getView<TextView>(R.id.count_phone).text = "联系电话: ${item.contactNumber}"
    }
}